package com.byted.camp.todolist.operation.db.converter;

import android.arch.persistence.room.TypeConverter;

import com.byted.camp.todolist.operation.db.entity.State;

public class StateTypeConverter {
    @TypeConverter
    public State stringToSomeObjectList(String data) {
        return State.from(Integer.valueOf(data));
    }

    @TypeConverter
    public String someObjectListToString(State someObjects) {
        return String.valueOf(someObjects.ordinal());
    }
}
